import sys
import os
import multiprocessing

path_of_current_dir = os.path.abspath(os.path.dirname(os.getcwd()))

_file_name = os.path.basename(__file__)

sys.path.insert(0, path_of_current_dir)

worker_class = 'sync'
workers = multiprocessing.cpu_count() + 1

# worker_connections = 1000
timeout = 30
# max_requests = 2000
# graceful_timeout = 30
# backlog = 512
# threads = 1
loglevel = 'debug'

reload = True
debug = True

bind = "%s:%s" % ("127.0.0.1", 5001)
errorlog = '%s/logs/%s_error.log' % (path_of_current_dir, _file_name)
accesslog = '%s/logs/%s_access.log' % (path_of_current_dir, _file_name)
access_log_format = '%(t)s %(p)s %(h)s "%(r)s" %(s)s %(L)s %(b)s %(f)s" "%(a)s"'
